<style>
    .pic-item{
        margin-right:6px;
        width:138px;
        height:70px;
        position: relative;
        margin-top:6px;
    }
    .pic-item img{
        border:1px solid #ccc;
        width: 136px;
        height: 68px;
    }
    .pic-item .pic-del{
        display: none;
        position: absolute;
        right:0px;
        top:0px;
        cursor: pointer;
        width:20px;
        height:20px;
        background-color: rgba(0,0,0,0.5);
    }
    .pic-item:hover .pic-del{
        display: inline-block;
    }
    .c-visibility{
        visibility: visible;
    }
    .c-hidden{
        visibility: hidden;
    }
</style>
<div class="table-header mt20 clearfix">
    <span class="fl lh30 f14 text-indent">户型列表：</span>
    <div class="fr btn-group">
        <button href="javascript: void(0)" class="btn btn-yellow permission p-0000200103-01-inline-block" id="btn_add"
           ui-dialog="添加户型"
           ui-dialog-data=""
           ng-disabled="canEdit==0||!curProjectId"
           ui-dialog-before-show="showAddHosueType($dialogScope,$data)"
           ui-dialog-ok="addOrUpdateHousetype($data)"
           ui-dialog-cache="false"
           ui-dialog-url="inc/dialog/add_housetype.html">添加户型</button>
    </div>
</div>
<div class="table-wrap mt10">
    <table width="100%">
        <thead>
            <tr>
                <th width="50">序号</th>
                <th width="300">预览图</th>
                <th width="200">户型名称</th>
                <th width="150">户型编号</th>
                <th width="150">户型类型</th>
                <th width="120">显示顺序</th>
                <th width="120">建筑面积(㎡)</th>
                <th width="120" ng-show="canEdit==1">操作</th>
            </tr>
        </thead>
        <tbody id="housetype_grid">
            <tr ng-repeat="housetype in housetypes" ng-mouseenter="showOperBtn=true" ng-mouseleave="showOperBtn=false">
                <td height="40">{{$index+1}}</td>
                <td>
                    <p >
                        <img ng-src="{{housetype.pic_url_list[0]}}" width="145px" height="91px" style="padding: 2px;">
                    </p>
                </td>
                <td>
                    <p>{{housetype.name}}</p>
                </td>
                <td>{{housetype.code}}</td>
                <td>{{getCategoryByCode(housetype.category)}}</td>
                <td>{{housetype.orders}}</td>
                <td>{{housetype.building_area}}</td>
                <td ng-show="canEdit==1">
                    <span class="js-oper-btn" ng-class="{'c-visibility':!!showOperBtn,'c-hidden':!showOperBtn}" >
                        <a href="javascript:void(0)" class="c-orange permission p-0000200103-02-inline"
                           ui-dialog="更新户型"
                           ui-dialog-data="housetype"
                           ui-dialog-before-show="showAddHosueType($dialogScope,$data)"
                           ui-dialog-ok="addOrUpdateHousetype($data)"
                           ui-dialog-cache="false"
                           ui-dialog-url="inc/dialog/add_housetype.html">编辑</a>&nbsp;&nbsp;&nbsp;
                        <a href="javascript:void(0)" class="c-orange permission p-0000200103-03-inline" ng-click="delHousetype(housetype)">删除</a>

                    </span>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="tab_loading" ng-if="loading"><span>加载中...</span></div>
    <div class="no-data" ng-show="!loading && housetypes.length==0"><span>暂无数据</span></div>
</div>
<div ui-pagination page-index="query.pageIndex" page-size="query.pageSize" total="query.total" changed="changedPage($pageIndex)"></div>



